package com.example.gss.entity;

import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 奖学金申请实体类，对应数据库中的scholarship_application表
 */
@Data
public class ScholarshipApplication implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    private String applicationId;   // 申请ID
    private String studentId;       // 学号
    private String studentName;     // 学生姓名（用于显示）
    private String grade;           // 年级（用于显示）
    private String scholarshipId;   // 奖学金ID
    private BigDecimal totalScore;  // 综合得分
    private BigDecimal ideologyScore; // 思政得分
    private BigDecimal academicScore; // 学业得分
    private BigDecimal researchScore; // 科研得分
    private BigDecimal serviceScore;  // 社会服务得分
    private String status;          // 状态(申请中/已通过/已拒绝)
    private Date applyDate;         // 申请日期
    private String reason;          // 申请理由
    private String contact;         // 联系方式

    // 无参构造函数
    public ScholarshipApplication() {
    }

    // 有参构造函数
    public ScholarshipApplication(String applicationId, String studentId,
                                  String scholarshipId, BigDecimal totalScore,
                                  BigDecimal ideologyScore, BigDecimal academicScore,
                                  BigDecimal researchScore, BigDecimal serviceScore,
                                  String status, Date applyDate, String reason, String contact) {
        this.applicationId = applicationId;
        this.studentId = studentId;
        this.scholarshipId = scholarshipId;
        this.totalScore = totalScore;
        this.ideologyScore = ideologyScore;
        this.academicScore = academicScore;
        this.researchScore = researchScore;
        this.serviceScore = serviceScore;
        this.status = status;
        this.applyDate = applyDate;
        this.reason = reason;
        this.contact = contact;
    }

    // 重写toString方法
    @Override
    public String toString() {
        return "ScholarshipApplication{" +
                "applicationId='" + applicationId + '\'' +
                ", studentId='" + studentId + '\'' +
                ", studentName='" + studentName + '\'' +
                ", grade='" + grade + '\'' +
                ", scholarshipId='" + scholarshipId + '\'' +
                ", totalScore=" + totalScore +
                ", ideologyScore=" + ideologyScore +
                ", academicScore=" + academicScore +
                ", researchScore=" + researchScore +
                ", serviceScore=" + serviceScore +
                ", status='" + status + '\'' +
                ", applyDate=" + applyDate +
                ", reason='" + reason + '\'' +
                ", contact='" + contact + '\'' +
                '}';
    }
}